function fIn = SetMicroscopicBCInletVelocity(ux,uy,fIn,rho,inlet_node_list)

% set microscopic inlet boundary conditions
    fIn(inlet_node_list,2) = fIn(inlet_node_list,4)+...
        (2/3)*rho(inlet_node_list).*ux(inlet_node_list);
    fIn(inlet_node_list,6) = fIn(inlet_node_list,8)+...
        (1/2)*(fIn(inlet_node_list,5)-fIn(inlet_node_list,3))...
        +(1/2)*rho(inlet_node_list).*uy(inlet_node_list)...
        +(1/6)*rho(inlet_node_list).*ux(inlet_node_list);
    fIn(inlet_node_list,9) = fIn(inlet_node_list,7) + ...
        (1/2)*(fIn(inlet_node_list,3)-fIn(inlet_node_list,5))...
        -(1/2)*rho(inlet_node_list).*uy(inlet_node_list)...
        +(1/6)*rho(inlet_node_list).*ux(inlet_node_list);